export interface IDeviceGroup {
  ID: string
  Name: string
  Description: string
}

export interface IPayType{
  ID: string
  Name: string
}

export interface ICardType{
  ID: string
  Name: string
}

export interface IResult<T>{
  Code: number
  Message: string
  Data: T
}

export interface IBrowserResult<T>{
  code: number
  message: string
  data: T
}

export interface IPersonalInfo{
  Id: string
  name: string
  uid: string
  address: string
  birthTime: Date
  sex: number
  age: number
  minZu: string
  idCardNo: string
  icCardNo: string
  cardType: string
}

export interface IPatient {
  CardNo?: string
  Name?: string
  Address?: string
  IcCardNo?: string
  Age?: number
  Sex?: '男' | '女' | '未知'
  Balance?: number
  IdCardNo?: string
  Uid?: string
  LastTime?: Date
  CreateTime?: Date
  ID?: string
}

export interface IDevice {
  Name: string
  Model: string
  Description?: string
  Mode: number
  Group: IDeviceGroup
  GroupId: string
  Port: number
  DllName: string
  DllPath: string
  DllClass: string
  DllWorkSpace: string
  IsEnable: number
  CreateTime?: Date
  CreateBy?: string
  UpdateTime?: Date
  UpdateBy?: string
  ID: string
}

export interface IModule {
  Name: string
  Description: string
  IsEnable: '是' | '否'
  ID: string
}

export interface IOperatorGroup {
  ID: string
  Name: string
  Description: string
}

export interface IOperator {
  Name: string
  Description: string
  Group: IOperatorGroup
  GroupId: string
  ClientId: string
  Password: string
  Token: string
  IsEnable: '是' | '否'
  CreateTime?: Date
  CreateBy?: string
  UpdateTime?: Date
  UpdateBy?: string
  ID: string
}

export interface ITheme{
  Name: string
  Route: string
}

export interface IRoom{
  ID: string
  Name: string
  HisId: string
  Code: string
  DepartmentId: string
  DepartmentCode: string
  DepartmentName: string
  CreateTime: Date
  CreateBy: string
  UpdateTime: Date
  UpdateBy: string
}

export interface IClient {
  Name: string
  Code: string
  Address: string
  Ip: string
  MacAddress: string
  Version?: string
  ClientVersion: string
  IsUpdate: boolean
  LastTime?: Date
  LoginTime?: Date
  CreateTime?: Date
  CreateBy?: string
  UpdateTime?: Date
  UpdateBy?: string
  Theme: ITheme
  ID: string
}

export interface ITimeInterval {
  Name: string;
  StartTime: string;
  EndTime: string;
  ID: string;
}

export interface IWorkTimeInterval {
  TimeInterval: ITimeInterval;
  DoctorId: string;
  TimeIntervalId: string;
  CreateTime: Date;
  CreateBy: string;
  UpdateTime: Date;
  UpdateBy: string;
  ID: string;
}

export interface IDoctor{
  Code: string;
  Name: string;
  Room?: IRoom;
  RoomId: string;
  Photo: string;
  DoctorLevel: string;
  Info: string;
  TotalFee: string;
  ExamFee: string;
  ClinicFee: string;
  Workday: Date;
  WorkTimeIntervals: IWorkTimeInterval[];
  CreateTime: Date;
  CreateBy: string;
  UpdateTime: Date;
  UpdateBy: string;
  ID: string;
}

export interface IClientVm {
  Devices: IDevice[]
  Modules: IModule[]
  Operators: IOperator[]
  CardTypes: ICardType[]
  PayTypes: IPayType[]
  Rooms: IRoom[]
  Doctors: IDoctor[]
  Entity: IClient
}

export interface IHospitalConfig{
  HospitalName: string
  HospitalLogo: string
  Phone: string
  It: string
}

export interface IReservationConfig{
  RotationInterval?: number
  CallNumber?: number
  CallTime?:number
}

export interface IConfig{
  HospitalConfig: IHospitalConfig
  ReservationConfig?: IReservationConfig
}

export interface ILog{
  Info: string
  Level: '调试' | '信息' | '警告' | '错误',
  Module: string
  CreateTime: Date
}

export interface IQueue{
  Name: string
  No: string
}

export interface IClientTask{
  Action: '重启' | '关机' | '刷新' | '关闭'
  Client: IClient
  ClientId: string
  Status: string
  CreateTime: Date
  UpdateTime: Date
  ID: string
}
